package dome2;

import java.util.Comparator;

/**
 * Created with IntelliJ IDEA.
 * Description: Comparator接口代码测试
 * User: 王圆豪
 * Date: 2024-06-06
 * Time: 21:11
 */
public class CompareByAge implements Comparator<Student> {
    @Override
    public int compare(Student o1, Student o2) {
        return o1.getAge() - o2.getAge();
    }
}
